package com.sunxd.brvahexpandableproject;

import com.chad.library.adapter.base.entity.node.BaseNode;

import java.util.ArrayList;
import java.util.List;

public class ModelLab {
    private List<BaseNode> mData;
    private ModelLab() {
        mData = new ArrayList<>();
        Material m1 = new Material();
        m1.setName("MPV方向盘");
        m1.setPrice(1234.5);
        SupplyData s1 = new SupplyData();
        s1.setName("新星");
        s1.setNumber(1000);
        s1.setPrice(1453.23);
        s1.setTime(100);
        m1.setSupplyData(s1);
        mData.add(m1);

        Material m2 = new Material();
        m2.setName("SUV方向盘");
        m2.setPrice(3453.5);
        SupplyData s2 = new SupplyData();
        s2.setName("枫叶");
        s2.setNumber(2000);
        s2.setPrice(4213.23);
        s2.setTime(300);
        m2.setSupplyData(s2);
        mData.add(m2);

        Material m3 = new Material();
        m3.setName("轿车方向盘");
        m3.setPrice(2313.5);
        SupplyData s3 = new SupplyData();
        s3.setName("枫叶");
        s3.setNumber(1500);
        s3.setPrice(3212.12);
        s3.setTime(356);
        m3.setSupplyData(s3);
        mData.add(m3);
    }

    public List<BaseNode> getData() {
        return mData;
    }

    public void setData(List<BaseNode> data) {
        mData = data;
    }

    private static ModelLab sInstance = null;
    public static ModelLab getInstance() {
        if (sInstance == null) {
            sInstance = new ModelLab();
        }
        return sInstance;
    }
}
